/*=========================================================================

 =========================================================================*/
// .NAME vtkLinesResample - resample points on a line
// .SECTION Description

#ifndef __vtkLinesResample_h
#define __vtkLinesResample_h

#include "vtkPolyDataAlgorithm.h"

class vtkIdList;
class vtkPoints;
class vtkPolyData;

#define VTK_RULED_MODE_RESAMPLE 0
#define VTK_RULED_MODE_POINT_WALK 1

class VTK_EXPORT vtkLinesResample : public vtkPolyDataAlgorithm
{
public:
  vtkTypeRevisionMacro(vtkLinesResample,vtkPolyDataAlgorithm);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Construct object with OnRatio=1, Offset=0. DistanceFactor=3.0,
  // CloseSurface off, and PassLines off.
  static vtkLinesResample *New();

  // Description:
  // If the ruled surface generation mode is RESAMPLE, then these parameters
  // are used to determine the resample rate. 
  vtkSetMacro(Resolution, int);
  vtkGetMacro(Resolution, int);


  vtkSetMacro(Delta, double);
  vtkGetMacro(Delta, double);
  
protected:
  vtkLinesResample();
  ~vtkLinesResample();

  // Usual data generation method
  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);

  int   Resolution;
  double Delta;
private:
  vtkIdList *Ids;
  double     Weights[4];

  void  Resample(vtkPolyData *output, vtkPolyData *input,
                 vtkPoints *inPts, vtkPoints *newPts, 
                 int npts, vtkIdType *pts);
  
private:
  vtkLinesResample(const vtkLinesResample&);  // Not implemented.
  void operator=(const vtkLinesResample&);  // Not implemented.
};

#endif
